export default {
  created() {
    if (this.item && this.item.vdStrLength !== undefined) {
      var label = this.item.getLabel();
      this.$emit("componentNotify", "addRule", {
        field: this.item.name,
        rules: [
          { required: true, message: "请填写" + label },
          {
            type: "string",
            len: this.item.vdStrLength,
            message: label + "必须是" + this.item.vdStrLength + "个字符"
          }
        ]
      });
    }
  }
};
